﻿@{
    ViewData["Title"] = "Index";
    Layout = "~/Areas/Console/Views/Shared/_Layout.cshtml";
}
@section head{
    <script type="text/javascript">
        var wireTransfer, remittanceAccount, cryptoCurrency
        var fromCurrency, withdrawCurrency
        var channelId
        var mothod = 1
        var price
        var renderTable;
        var userType = 0;
        layui.config({
            base: '../../layuiadmin/' //静态资源所在路径
        }).extend({
            treetable: 'treetable-lay/treetable',
            index: 'lib/index'
        }).use(['table', 'form', 'treetable', 'index', 'upload'], function () {
            var $ = layui.$
                , form = layui.form
                , admin = layui.admin
                , upload = layui.upload
                , table = layui.table
                , element = layui.element
                , treetable = layui.treetable;
            top.SetListPageLanguage(layui);

            $("#addWireTransfer").click(function () {
                top.OpenPageByKey(layui, "addWireTransfer", 2, '90%', '90%', '/Withdraw/CreateWireTransfer');
            });

            $("#editWireTransfer").click(function () {
                top.OpenPageByKey(layui, "editWireTransfer", 2, '90%', '90%', '/Withdraw/EditWireTransfer?id=' + $("#wireTransferId").val());
            });

            $("#delWireTransfer").click(function () {
                var postData = {
                    id: $("#wireTransferId").val()
                };
                top.ConfirmByKey(layui, 'confirmDelete', postData, "/Withdraw/DeleteWireTransfer", "POST", "deleteSuccess", "deleteFail", function () {
                    parent.location.reload();
                });
            });

            $("#addRemittanceAccount").click(function () {
                top.OpenPageByKey(layui, "addRemittanceAccount", 2, '90%', '90%', '/Withdraw/CreateRemittanceAccount');
            });

            $("#editRemittanceAccount").click(function () {
                top.OpenPageByKey(layui, "editRemittanceAccount", 2, '90%', '90%', '/Withdraw/EditRemittanceAccount?id=' + $("#remittanceAccountId").val());
            });

            $("#delRemittanceAccount").click(function () {
                var postData = {
                    id: $("#remittanceAccountId").val()
                };
                top.ConfirmByKey(layui, 'confirmDelete', postData, "/Withdraw/DeleteRemittanceAccount", "POST", "deleteSuccess", "deleteFail", function () {
                    parent.location.reload();
                });
            });

            $("#addCryptoCurrency").click(function () {
                top.OpenPageByKey(layui, "addCryptoCurrency", 2, '90%', '90%', '/Withdraw/CreateCryptocurrency');
            });

            $("#editCryptoCurrency").click(function () {
                top.OpenPageByKey(layui, "editCryptoCurrency", 2, '90%', '90%', '/Withdraw/EditCryptocurrency?id=' + $("#cryptoCurrencyId").val());
            });

            $("#delCryptoCurrency").click(function () {
                var postData = {
                    id: $("#cryptoCurrencyId").val()
                };
                top.ConfirmByKey(layui, 'confirmDelete', postData, "/Withdraw/DeleteCrmCryptocurrency", "POST", "deleteSuccess", "deleteFail", function () {
                    parent.location.reload();
                });
            });

            //电汇账户开始
            $.getJSON("/Withdraw/CrmWireTransfer", function (result) {
                let plat = result.data;
                wireTransfer = result.data;
                plat.forEach(function (v) {
                    $('#wireTransferCurrency').append(new Option(v.currency, v.id));
                });
                if (result.data.length > 0) {
                    $('#wireTransferCurrencyCard').show()
                    setFromCurrency($('select[name="wireTransferCurrency"] option:selected').val(), wireTransfer[0].currency, wireTransfer)
                    $('#wireTransferId').val(wireTransfer[0].id)
                    $('#payee').html(wireTransfer[0].payee);
                    $('#payeenumber').html(wireTransfer[0].accountNumber);
                    $('#payeeaddress').html(wireTransfer[0].payeeAddress);
                    $('#payeebank').html(wireTransfer[0].bank);
                    $('#swiftcode').html(wireTransfer[0].swiftcode);
                    $('#bankaddress').html(wireTransfer[0].bankAddress);
                }
                else {
                    $('#wireTransferCurrencyCard').hide()
                    $('#withdrawForm').hide()
                }
                layui.form.render("select");
            });

            form.on('select(wireTransferCurrency)', function (data) {
                wireTransfer.forEach(function (v) {
                    if (v.id == data.value) {
                        setFromCurrency(data.value, v.currency, wireTransfer)
                        $("#wireTransferId").val(v.id)
                        $('#payee').html(v.payee);
                        $('#payeenumber').html(v.accountNumber);
                        $('#payeeaddress').html(v.payeeAddress);
                        $('#payeebank').html(v.bank);
                        $('#swiftcode').html(v.swiftcode);
                        $('#bankaddress').html(v.bankAddress);
                    }
                });
                form.render();
            });
            //电汇账户结束

            //汇款账户开始
            $.getJSON("/Withdraw/CrmRemittanceAccount", function (result) {
                let plat = result.data;
                remittanceAccount = result.data;
                plat.forEach(function (v) {
                    $('#remittanceAccountCurrency').append(new Option(v.currency, v.id));
                });
                if (result.data.length > 0) {
                    $('#remittanceAccountCurrencyCard').show()
                    $('#remittanceAccountId').val(remittanceAccount[0].id);
                    $('#accountname').html(remittanceAccount[0].payee);
                    $('#accountnumber').html(remittanceAccount[0].accountNumber);
                    $('#bank').html(remittanceAccount[0].bank);
                    $('#branchname').html(remittanceAccount[0].branchName);
                    $('#qrcode').attr("src", remittanceAccount[0].qrcode);
                }
                else {
                    $('#remittanceAccountCurrencyCard').hide()
                }
                layui.form.render("select");
            });

            form.on('select(remittanceAccountCurrency)', function (data) {
                remittanceAccount.forEach(function (v) {
                    if (v.id == data.value) {
                        setFromCurrency(data.value, v.currency, remittanceAccount)
                        $("#remittanceAccountId").val(v.id)
                        $('#accountname').html(v.payee);
                        $('#accountnumber').html(v.accountNumber);
                        $('#bank').html(v.bank);
                        $('#branchname').html(v.branchName);
                        $('#qrcode').attr("src", v.qrcode);
                    }
                });
                form.render();
            });
            //汇款账户结束

            //加密货币开始
            $.getJSON("/Withdraw/CrmCryptocurrency", function (result) {
                let plat = result.data;
                cryptoCurrency = result.data;
                plat.forEach(function (v) {
                    $('#cryptoCurrency').append(new Option(v.currency, v.id));
                });
                if (result.data.length > 0) {
                    $('#cryptoCurrencyCard').show()
                    $("#cryptoCurrencyId").val(cryptoCurrency[0].id)
                    $('#network').html(cryptoCurrency[0].network);
                    $('#receivingaddress').html(cryptoCurrency[0].receivingAddress);
                }
                else {
                    $('#cryptoCurrencyCard').hide()
                }
                layui.form.render("select");
            });

            form.on('select(cryptoCurrency)', function (data) {
                cryptoCurrency.forEach(function (v) {
                    if (v.id == data.value) {
                        setFromCurrency(data.value, v.currency, cryptoCurrency)
                        $("#cryptoCurrencyId").val(v.id)
                        $('#network').html(v.network);
                        $('#receivingaddress').html(v.receivingAddress);
                    }
                });
                form.render();
            });
            //加密货币结束

            $.getJSON("/Deposit/GetMt5User", function (result) {
                let plat = result.data;
                withdraw = result.data;
                plat.forEach(function (v) {
                    $('#mt5user').append(new Option(v.login + "(" + v.balance.toFixed(2) + v.currency + ")", v.login));
                });
                setWithdrawcurrency(withdraw[0].currency)
                layui.form.render("select");
            });

            //TAB切换
            element.on('tab(withdraw)', function (elem) {
                var selectVal;
                mothod = elem.index + 1
                if (elem.index == 0) {
                    fromCurrency = $('select[name="wireTransferCurrency"] option:selected').text()
                    selectVal = $('select[name="wireTransferCurrency"] option:selected').val()
                    setFromCurrency(selectVal, fromCurrency, wireTransfer)
                }
                else if (elem.index == 1) {
                    fromCurrency = $('select[name="remittanceAccountCurrency"] option:selected').text()
                    selectVal = $('select[name="remittanceAccountCurrency"] option:selected').val()
                    setFromCurrency(selectVal, fromCurrency, remittanceAccount)
                }
                else if (elem.index == 2) {
                    fromCurrency = $('select[name="cryptoCurrency"] option:selected').text()
                    selectVal = $('select[name="cryptoCurrency"] option:selected').val()
                    setFromCurrency(selectVal, fromCurrency, cryptoCurrency)
                }
            });

            $("#withdrawamount").blur(function () {
                getWithdrawAmount(fromCurrency, withdrawCurrency, $('#withdrawamount').val())
            });

            //设置来源币种
            function setFromCurrency(channel, currency, select) {
                console.log(channel, currency)
                console.log(channel, currency, select)
                console.log($(select).length)
                channelId = channel
                fromCurrency = currency
                console
                if ($(select).length == 0) {
                    $('#withdrawForm').hide()
                }
                else {
                    $('#withdrawForm').show()
                    $("#fromcurrency").html(currency)
                    getExchangeRate(fromCurrency, withdrawCurrency)
                }
            }

            //设置来源币种
            function setWithdrawcurrency(currency) {
                withdrawCurrency = currency
                $("#withdrawcurrency").html(currency)
                getExchangeRate(fromCurrency, withdrawCurrency)
            }

            //获取汇率
            function getExchangeRate(fromCurrency, withdrawCurrency) {
                //console.log(fromCurrency, depositCurrency)
                if (fromCurrency != null && withdrawCurrency != null) {
                    $.ajax({
                        type: "POST",
                        url: "/Assets/GetExchangeRate",
                        data: {
                            "from": fromCurrency,
                            "to": withdrawCurrency
                        },
                        async: true,
                        error: function (request) {
                            alert("Connection error");
                        },
                        beforeSend: function (xhr) {
                            layui.layer.load();
                        },
                        success: function (data) {
                            var item = eval(data);
                            if (item.code == 0) {
                                if (item.data != null) {
                                    price = item.data.price
                                    $('#exchangerate').val(item.data.from + '/' + item.data.to + '=' + item.data.price)
                                }
                            }
                            else {
                                top.ShowMessageByKey(layui, item.data, 0, 1000);
                                $('#exchangerate').val('')
                            }
                            layer.closeAll('loading');
                        }
                    });
                    getWithdrawAmount(fromCurrency, withdrawCurrency, $('#withdrawamount').val())
                }
            }

            //获取汇率
            function getWithdrawAmount(fromCurrency, withdrawCurrency, amount) {
                if (fromCurrency != null && withdrawCurrency != null) {

                    $.ajax({
                        type: "POST",
                        url: "/Assets/GetRealAmount",
                        data: {
                            "from": fromCurrency,
                            "to": withdrawCurrency,
                            "amount": amount
                        },
                        async: true,
                        error: function (request) {
                            alert("Connection error");
                        },
                        beforeSend: function (xhr) {
                            layui.layer.load();
                        },
                        success: function (data) {
                            var item = eval(data);
                            if (item.code == 0) {
                                $('#fees').val(item.data.commission)
                                $('#fromamount').val(item.data.payAmount)
                                $('#withdrawamountshow').html(item.data.payAmount)
                            }
                            else {
                                top.ShowMessageByKey(layui, item.data, 0, 1000);
                            }
                            layer.closeAll('loading');
                        }
                    });
                }
            }

            //出金提交
            form.on('submit(submitWithdraw)', function (data) {
                //var channelId = $("#wireTransferCurrency option:selected").val()
                //var mothod = mothod
                var mt5Id = $("#mt5user option:selected").val()
                var withdrawamount = $("#withdrawamount").val()
                var withdrawcurrency = $("#withdrawcurrency").text()
                var fees = $("#fees").val()
                var fromamount = $("#fromamount").val()
                var fromcurrency = $("#fromcurrency").text()
                var password = $("#password").val()
                var remarks = $("#remark").val()
                console.log(channelId, mothod, mt5Id, withdrawcurrency, withdrawamount, fees, fromamount, fromcurrency, password, remarks)
                $.ajax({
                    type: "POST",
                    url: "/Withdraw/Withdraw",
                    data: {
                        "channelId": channelId,
                        "mothod": mothod,
                        "mt5Id": mt5Id,
                        "fees": fees,
                        "withdrawcurrency": withdrawcurrency,
                        "fromcurrency": fromcurrency,
                        "withdrawamount": withdrawamount,
                        "fromamount": fromamount,
                        "password": password,
                        "remarks": remarks,
                    },
                    async: true,
                    error: function (request) {
                        alert("Connection error");
                    },
                    beforeSend: function (xhr) {
                        layui.layer.load();
                    },
                    success: function (data) {
                        var item = eval(data);
                        if (item.code == 0) {
                            top.ShowMessageByKey(layui, item.msg, 6, 1000, function () {
                                location.reload();
                            });
                        } else {
                            top.ShowMessageByKey(layui, item.msg, 0, 1000);
                        }
                        layer.closeAll('loading');
                    }
                });
                return false;
            });

            $("#gotoSetTradePassword").click(function () {
                parent.layui.index.openTabsPage("/Personal/TradePassword");
                //初始化导航选项卡（选中新建标签卡）
                parent.layui.element.render('nav');
            });

            $("#gotoSetFinancial").click(function () {
                parent.layui.index.openTabsPage("/Personal/Index");
                //初始化导航选项卡（选中新建标签卡）
                parent.layui.element.render('nav');
            });

            //图片预览事件
            $('#qrcode').click(function (e) {
                previewImg(this);
                e.stopPropagation()
            });
        });


    </script>
}
    <div class="layui-fluid">
        <div class="layui-row layui-col-space15">
        @if (ViewBag.noFinancial)
        {
            <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-body" style="text-align:center;">
                            <blockquote class="layui-elem-quote" id="setFinancial" lay-event="setFinancial">请先完善您的财务认证</blockquote>
                        <button type="button" class="layui-btn" id="gotoSetFinancial" lay-event="gotoSetFinancial">请先完善您的财务认证</button>
                        </div>
                    </div>
                </div>
        }
        else
        {
            @if (ViewBag.noTradePassword)
            {
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-body" style="text-align:center;">
                            <blockquote class="layui-elem-quote" id="setTradePassword" lay-event="setTradePassword">请先设置您的资金密码</blockquote>
                            <button type="button" class="layui-btn" id="gotoSetTradePassword" lay-event="gotoSetTradePassword">前往设置资金密码</button>
                        </div>
                    </div>
                </div>
            }
            else
            {
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-body">
                            <div class="layui-tab layui-tab-brief" lay-filter="withdraw">
                                <ul class="layui-tab-title">
                                    <li lay-event="wireTransfer" class="layui-this">电汇账户</li>
                                    <li lay-event="remittanceAccount">汇款账户</li>
                                    <li lay-event="cryptoCurrency">数字货币</li>
                                </ul>
                                <div class="layui-tab-content" style="padding-top:0;">
                                    <div class="layui-tab-item layui-show">
                                        <form class="layui-form">
                                            <div class="layui-form-item" style="float:right;">
                                                <button type="button" class="layui-btn layui-btn-sm add-withdraw" id="addWireTransfer">添加电汇账户</button>
                                            </div>
                                            <div class="layui-form-item">
                                                <label class="layui-form-label" lay-event="paymentMethod" style="width:100px;">提现方式</label>
                                                <div class="layui-input-block" style="margin-left:130px;">
                                                    <select name="wireTransferCurrency" id="wireTransferCurrency" lay-filter="wireTransferCurrency">
                                                    </select>
                                                </div>
                                            </div>
                                            <div class="layui-card withdraw-card" id="wireTransferCurrencyCard">
                                                <div class="layui-card-header" style="text-align: right;">
                                                    <div class="layui-btn-group">
                                                        <button type="button" class="layui-btn layui-btn-sm" id="editWireTransfer">编辑</button>
                                                        <button type="button" class="layui-btn layui-btn-sm" id="delWireTransfer">删除</button>
                                                    </div>
                                                </div>
                                                <div class="layui-card-body">
                                                    <div class="layui-row">
                                                        <input type="hidden" id="wireTransferId">
                                                        <div class="layui-col-xs12 layui-col-md6">
                                                            <div class="layui-form-item">
                                                                <label class="layui-form-label" lay-event="payeetitle" style="width:100px;">收款人</label>
                                                                <label class="form-label" style="padding-left:0px; text-align:left;" name="payee" id="payee"></label>
                                                            </div>
                                                        </div>
                                                        <div class="layui-col-xs12 layui-col-md6">
                                                            <div class="layui-form-item">
                                                                <label class="layui-form-label" lay-event="payeenumbertitle" style="width:100px;">收款账户</label>
                                                                <label class="form-label" style="padding-left:0px; text-align:left;" name="payeenumber" id="payeenumber"></label>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="layui-row">
                                                        <div class="layui-col-xs12 layui-col-md6">
                                                            <div class="layui-form-item">
                                                                <label class="layui-form-label" lay-event="payeeaddresstitle" style="width:100px;">收款人地址</label>
                                                                <label class="form-label" style="padding-left:0px; text-align:left;" name="payeeaddress" id="payeeaddress"></label>
                                                            </div>
                                                        </div>
                                                        <div class="layui-col-xs12 layui-col-md6">
                                                            <div class="layui-form-item">
                                                                <label class="layui-form-label" lay-event="payeebanktitle" style="width:100px;">收款银行</label>
                                                                <label class="form-label" style="padding-left:0px; text-align:left;" name="payeebank" id="payeebank"></label>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="layui-row">
                                                        <div class="layui-col-xs12 layui-col-md6">
                                                            <div class="layui-form-item">
                                                                <label class="layui-form-label" lay-event="swiftcodetitle" style="width:100px;">SWIFT Code</label>
                                                                <label class="form-label" style="padding-left:0px; text-align:left;" name="swiftcode" id="swiftcode"></label>
                                                            </div>
                                                        </div>
                                                        <div class="layui-col-xs12 layui-col-md6">
                                                            <div class="layui-form-item">
                                                                <label class="layui-form-label" lay-event="bankaddresstitle" style="width:100px;">收款银行地址</label>
                                                                <label class="form-label" style="padding-left:0px; text-align:left;" name="bankaddress" id="bankaddress"></label>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </form>
                                    </div>
                                    <div class="layui-tab-item">
                                        <form class="layui-form">
                                            <div class="layui-form-item" style="float:right;">
                                                <button type="button" class="layui-btn layui-btn-sm add-withdraw" id="addRemittanceAccount">添加汇款账户</button>
                                            </div>
                                            <div class="layui-form-item">
                                                <label class="layui-form-label" lay-event="currencytitle" style="width:100px;">收款货币</label>
                                                <div class="layui-input-block" style="margin-left:130px;">
                                                    <select name="remittanceAccountCurrency" id="remittanceAccountCurrency" lay-filter="remittanceAccountCurrency">
                                                    </select>
                                                </div>
                                            </div>
                                            <div class="layui-card withdraw-card" id="remittanceAccountCurrencyCard">
                                                <div class="layui-card-header" style="text-align: right;">
                                                    <div class="layui-btn-group">
                                                        <button type="button" class="layui-btn layui-btn-sm" id="editRemittanceAccount">编辑</button>
                                                        <button type="button" class="layui-btn layui-btn-sm" id="delRemittanceAccount">删除</button>
                                                    </div>
                                                </div>
                                                <div class="layui-card-body">
                                                    <div class="layui-row">
                                                        <input type="hidden" id="remittanceAccountId">
                                                        <div class="layui-col-xs12 layui-col-md6">
                                                            <div class="layui-form-item">
                                                                <label class="layui-form-label" lay-event="accountnametitle" style="width:100px;">开户姓名</label>
                                                                <label class="form-label" style="padding-left:0px; text-align:left;" name="accountname" id="accountname"></label>
                                                            </div>
                                                        </div>
                                                        <div class="layui-col-xs12 layui-col-md6">
                                                            <div class="layui-form-item">
                                                                <label class="layui-form-label" lay-event="accountnumbertitle" style="width:100px;">银行卡号</label>
                                                                <label class="form-label" style="padding-left:0px; text-align:left;" name="accountnumber" id="accountnumber"></label>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="layui-row">
                                                        <div class="layui-col-xs12 layui-col-md6">
                                                            <div class="layui-form-item">
                                                                <label class="layui-form-label" lay-event="banktitle" style="width:100px;">收款银行</label>
                                                                <label class="form-label" style="padding-left:0px; text-align:left;" name="bank" id="bank"></label>
                                                            </div>
                                                        </div>
                                                        <div class="layui-col-xs12 layui-col-md6">
                                                            <div class="layui-form-item">
                                                                <label class="layui-form-label" lay-event="branchnametitle" style="width:100px;">支行名称</label>
                                                                <label class="form-label" style="padding-left:0px; text-align:left;" name="branchname" id="branchname"></label>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="layui-row">
                                                        <div class="layui-col-xs12 layui-col-md6">
                                                            <div class="layui-form-item">
                                                                <label class="layui-form-label" lay-event="qrcodetitle" style="width:100px;">收款二维码</label>
                                                                <img class="head-img" name="qrcode" id="qrcode" width="96" height="96">
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </form>
                                    </div>
                                    <div class="layui-tab-item">
                                        <form class="layui-form">
                                            <div class="layui-form-item" style="float:right;">
                                                <button type="button" class="layui-btn layui-btn-sm add-withdraw" id="addCryptoCurrency">添加数字货币</button>
                                            </div>
                                            <div class="layui-form-item">
                                                <label class="layui-form-label" lay-event="currencytitle" style="width:100px;">收款货币</label>
                                                <div class="layui-input-block" style="margin-left:130px;">
                                                    <select name="cryptoCurrency" id="cryptoCurrency" lay-filter="cryptoCurrency">
                                                    </select>
                                                </div>
                                            </div>
                                            <div class="layui-card withdraw-card" id="cryptoCurrencyCard">
                                                <div class="layui-card-header" style="text-align: right;">
                                                    <div class="layui-btn-group">
                                                        <button type="button" class="layui-btn layui-btn-sm" id="editCryptoCurrency">编辑</button>
                                                        <button type="button" class="layui-btn layui-btn-sm" id="delCryptoCurrency">删除</button>
                                                    </div>
                                                </div>
                                                <div class="layui-card-body">
                                                    <div class="layui-row">
                                                        <input type="hidden" id="cryptoCurrencyId">
                                                        <div class="layui-col-xs12 layui-col-md6">
                                                            <div class="layui-form-item">
                                                                <label class="layui-form-label" lay-event="networktitle" style="width:100px;">区块链网络</label>
                                                                <label class="form-label" style="padding-left:0px; text-align:left;" name=" " id="network"></label>
                                                            </div>
                                                        </div>
                                                        <div class="layui-col-xs12 layui-col-md6">
                                                            <div class="layui-form-item">
                                                                <label class="layui-form-label" lay-event="receivingaddresstitle" style="width:100px;">地址</label>
                                                                <label class="form-label" style="padding-left:0px; text-align:left;" name="receivingaddress" id="receivingaddress"></label>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </form>
                                    </div>
                                </div>
                            </div>
                            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 50px;">
                            </fieldset>
                            <form class="layui-form" id="withdrawForm">
                                <div class="layui-form-item">
                                    <label class="layui-form-label" lay-event="mt5usertitle">MT5账号</label>
                                    <div class="layui-input-block">
                                        <select class="mt5user" name="mt5user" id="mt5user" lay-filter="mt5user" disabled style="color:rebeccapurple">
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <div class="layui-input-group">
                                        <div class="layui-input-prefix" lay-event="withdrawamounttitle">提现金额</div>
                                        <input type="text" placeholder="" class="layui-input" id="withdrawamount" name="withdrawamount">
                                        <div class="layui-input-split layui-input-suffix" id="withdrawcurrency" name="withdrawcurrency">
                                            USD
                                        </div>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <div class="layui-input-group">
                                        <div class="layui-input-prefix"></div>
                                        <input type="text" placeholder="" class="layui-input" id="fromamount" name="fromamount" disabled>
                                        <div class="layui-input-split layui-input-suffix" id="fromcurrency" name="fromcurrency">
                                            USD
                                        </div>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label" lay-event="wexchangeratetitle">出金汇率</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="exchangerate" id="exchangerate" class="layui-input" disabled>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <div class="layui-input-group">
                                        <div class="layui-input-prefix">预计手续费</div>
                                        <input type="text" placeholder="" class="layui-input" id="fees" name="fees" disabled>
                                        <div class="layui-input-split layui-input-suffix" id="feescurrency" name="feescurrency">
                                            USD
                                        </div>
                                    </div>
                                </div>

                                <div class="layui-form-item">
                                    <label class="layui-form-label">资金密码</label>
                                    <div class="layui-input-block">
                                        <input type="password" autocomplete="off" placeholder="资金密码" class="layui-input" id="password">
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">备注</label>
                                    <div class="layui-input-block">
                                        <input type="text" autocomplete="off" placeholder="备注" class="layui-input" id="remark">
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">请支付</label>
                                    <div class="layui-input-block">
                                        <div class="layui-card-body crm-depositamount" id="withdrawamountshow" name="withdrawamountshow">
                                        </div>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <div class="layui-input-block">
                                        <button type="submit" class="layui-btn" lay-submit lay-filter="submitWithdraw">立即提交</button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            }
        }
    </div>
</div>